<template>
    <div class="panel">

        <panelItem>

             <div class="item">
            <div class="img">
                <img src="@/assets/img/home/all.png">
            </div>
            <div class="text">
                <p>访问总人数:</p>
                <p>{{panel_data.num_people}}</p>
            </div>
        </div>

         <div class="item">
            <div class="img">
                <img src="@/assets/img/home/add.png">
            </div>
            <div class="text">
                <p>昨日访问人数:</p>
                <p>{{panel_data.yesterday_people}}</p>
            </div>
        </div>

         <div class="item">
            <div class="img">
                <img src="@/assets/img/home/message.png">
            </div>
            <div class="text">
                <p>留言总数:</p>
                <p>{{panel_data.num_message}}</p>
            </div>
        </div>

         <div class="item">
            <div class="img">
                <img src="@/assets/img/home/time.png">
            </div>
            <div class="text">
                <p>网站已运行:</p>
                <p>{{num_day}}天</p>
            </div>
        </div>

        </panelItem>

    </div>
</template>

<script>
import panelItem from './panelItem'

import {day} from '@/untils/time/day'

export default {
    name:'panel',
    components:{
        panelItem
    },
    data(){
        return{
            num_day:''
        }
    },
    props:{
        panel_data:{
            type:[String,Object,Array]
        }
    },
    created(){
        this.num_day = day(2020,5,25)
    }
}
</script>

<style scoped>

</style>